package test.boid.vo;

import java.util.HashMap;

import sun.security.action.GetLongAction;

import com.jme.scene.Node;
import com.jme.scene.shape.Sphere;

import dviz.visualSystem.impl.AnimationObject;


// This is the visual object that can be used to visualize Java Objects
// By using @ObjectMap("sphere")
/**
 * @author  zxq071000
 */
public class sphere extends AnimationObject {

	int x;
	int y;

	public sphere(HashMap<String, Object> initVector) {
		super(initVector);

		// Getting the Root Node for this Object to be rendered onto the screen
		Node renderNode = getRenderNode();
		// Create a new sphere to be rendered onto screen (JMonkeyEngine API)
		Sphere sphere = new Sphere("", 10, 10, 1);
		// Attach this object onto the render root node
		renderNode.attachChild(sphere);
	}

	/**
	 * @param x
	 * @uml.property  name="x"
	 */
	public void setX(int x) {
		this.x = x;
		// Update the visual object translation
		getRenderNode().getLocalTranslation().setX(x);
	}

	/**
	 * @param y
	 * @uml.property  name="y"
	 */
	public void setY(int y) {
		this.y = y;
		// Update the visual object translation
		getRenderNode().getLocalTranslation().setY(y);
	}

	public void playDead(HashMap<String, Object> initVector) {
		// You can put some animation code here
	}

}
